package struct;
public class Term implements Identity, Cloneable {

    Identity term;
        
    public Term(Identity term) {
        super();
        this.term = term;
    }

    public void setIndex(int idx) {
        term.setIndex(idx);
    }

    public int getMaxIndex() {
        return term.getMaxIndex();
    }
    
    public Identity getTerm()
    {
        return term;
    }
    
    public void setTerm(Identity newTerm)
    {
    	term = newTerm;
    }

    public String toString()
    {
        return term.toString();
    }
    
    public boolean equals(Object term)
    {
        boolean ret = false;
        if (term != null && term instanceof Term)
        {
            ret = this.term.equals(((Term)term).getTerm());
        }
        return ret;
    }
    
    public Object clone()
    {
    	return new Term((Identity) term.clone());
    }
}
